home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / UTILITY / NNANS592.ARJ / DRIVERS.INC < prev    next >
Text File  |  1991-06-06  |  10KB  |  365 lines

  1. ; display specific definitions follow. You will need to add to these to 
  2. ; configure for unsupported display controllers.
  3.  
  4.      ; default generic graphics. USE THESE AS "TEMPLATES"
  5. gmode_test macro isgraphic
  6.     ; This macro is to jump if display is in an EGA/VGA 16 color 
  7.     ; "compatible" mode -- this means one which is a simple extension
  8.     ; (more rows and/or columns) than modes 10h or 12h. At minimum
  9.     ; modes 10h and 12h themselves qualify.
  10.     ; No registers may be altered.
  11.     ; Byte location "cs:video_mode" is a copy of byte 40:49H.
  12.     cmp    cs:video_mode, 10h    ; 640x350, 16 color mode
  13.     je    isgraphic
  14.     cmp    cs:video_mode, 12h    ; 640x480, 16 color VGA mode
  15.     je    isgraphic
  16. endm
  17. gmode_code macro
  18.     ; this macro is used to tell if display is in graphics
  19.     ; mode by looking at the byte 40:49H, which is in
  20.     ; register AL at the start of the macro.
  21.     ; It is to set location cs:gmode_flag non-zero if in a graphics mode.
  22.     ; Value of 7 is reserved for the monochrome adapter.
  23.     ; No registers may be altered.
  24.     ; *NOTE* users of Paradise and possibly other VGA
  25.     ; cards will need to modifify this routine because
  26.     ; Paradise extended character modes set this byte to
  27.     ; to the value of the mode you selected.  Nicer cards
  28.     ; (Genoa and VEGA, that I know of) leave this byte at
  29.     ; "3" and all works fine!
  30.     mov    cs:gmode_flag,0        ; assume character mode (zero flag)
  31.     cmp    al, 4
  32.     jb    not_graphics        ; modes =>4 are assumed to be graphic
  33.     mov    cs:gmode_flag,al    ; non-zero value
  34. not_graphics:
  35. endm
  36.  
  37. IF PARA480
  38. ; From Arend van den Brug
  39. card_id    macro
  40.     db    'Paradise EGA 480'
  41. endm
  42.  
  43. gmode_test macro isgraphic
  44.     cmp    cs:video_mode, 10h    ; 640x350, 16 color mode
  45.     je    isgraphic
  46.     cmp    cs:video_mode, 50h    ; 640x480, 16 color EGA mode
  47.     je    isgraphic
  48. endm
  49. gmode_code macro
  50.     mov    cs:gmode_flag,0        ; assume character mode (zero flag)
  51.     cmp    al, 4
  52.     jb    not_graphics        ; modes =>4 are assumed to be graphic
  53.     cmp    al, 51h            ; 51: 80x30 text 16 colors 
  54.     je    not_graphics
  55.     cmp    al, 54h            ; 54: 132x43 text 16 colors 
  56.     je    not_graphics
  57.     cmp    al, 55h            ; 55: 132x25 text 16 colors 
  58.     je    not_graphics
  59.     mov    cs:gmode_flag,al    ; non-zero value
  60. not_graphics:
  61. endm
  62. ENDIF
  63.  
  64. IF PARADISE
  65. card_id macro
  66.     db    'Paradise VGA'
  67. endm
  68. gmode_test macro isgraphic
  69.     cmp    cs:video_mode, 10h    ; 640x350, 16 color mode
  70.     je    isgraphic
  71.     cmp    cs:video_mode, 12h    ; 640x480, 16 color VGA mode
  72.     je    isgraphic
  73.     cmp    cs:video_mode, 58h    ; 800x600, 16 color
  74.     je    isgraphic
  75. endm
  76. gmode_code macro
  77.     mov    cs:gmode_flag,0        ; assume character mode (zero flag)
  78.     cmp    al, 4
  79.     jb    not_graphics        ; modes =>4 are assumed to be graphic
  80.     cmp    al, 54h            ; modes 54 and 55 are text!
  81.     je    not_graphics
  82.     cmp    al, 55h
  83.     je    not_graphics
  84.     mov    cs:gmode_flag,al    ; non-zero value
  85. not_graphics:
  86. endm
  87. ENDIF
  88.  
  89. IF TSENG4000
  90. card_id    macro
  91.     db    'TSENG LABS 4000'
  92. endm
  93.  
  94. gmode_test macro isgraphic
  95.     cmp    cs:video_mode, 10h    ; 640x350, 16 color mode
  96.     je    isgraphic
  97.     cmp    cs:video_mode, 12h    ; 640x480, 16 color VGA mode
  98.     je    isgraphic
  99.     cmp    cs:video_mode, 29h    ; 800x600, 16 color
  100.     je    isgraphic
  101. endm
  102. gmode_code macro
  103.     mov    cs:gmode_flag,0        ; assume character mode (zero flag)
  104.     cmp    al, 4
  105.     jb    not_graphics        ; modes =>4 are assumed to be graphic
  106.     cmp    al, 22h            ; 132x44, 25, 28
  107.     jb    is_graphics
  108.     cmp    al, 24h
  109.     jbe    not_graphics
  110.     cmp    al, 26h            ; 80x60
  111.     je    not_graphics
  112.     cmp    al, 2Ah            ; 100x40
  113.     je    not_graphics
  114. is_graphics:
  115.     mov    cs:gmode_flag,al    ; non-zero value
  116. not_graphics:
  117. endm
  118. ENDIF
  119.  
  120.  
  121. IF ATT600
  122. card_id macro
  123.     db    'AT&T VDC600'
  124. endm
  125. gmode_test macro isgraphic
  126.     cmp    cs:video_mode, 10h    ; 640x350, 16 color mode
  127.     je    isgraphic
  128.     cmp    cs:video_mode, 12h    ; 640x480, 16 color VGA mode
  129.     je    isgraphic
  130.     cmp    cs:video_mode, 47h    ; 800x600, 16 color
  131.     je    isgraphic
  132. endm
  133. gmode_code macro
  134.     mov    cs:gmode_flag,0        ; assume character mode (zero flag)
  135.     cmp    al, 4
  136.     jb    not_graphics        ; modes >=4 are assumed to be graphic
  137.     cmp    al, 54h            ; modes 54 and 55 are text!
  138.     je    not_graphics
  139.     cmp    al, 55h
  140.     je    not_graphics
  141.     mov    cs:gmode_flag,al    ; non-zero value
  142. not_graphics:
  143. endm
  144. ENDIF
  145.  
  146. IF STBVGA
  147. card_id    macro
  148.     db    'STB VGA Extra'
  149. endm
  150. gmode_test macro isgraphic
  151.     cmp    cs:video_mode, 10h    ; 640x350, 16 color mode
  152.     je    isgraphic
  153.     cmp    cs:video_mode, 12h    ; 640x480, 16 color VGA mode
  154.     je    isgraphic
  155. endm
  156. gmode_code macro
  157.     mov    cs:gmode_flag,0        ; assume character mode (zero flag)
  158.     cmp    al, 4
  159.     jb    not_graphics        ; modes >=4 are assumed to be graphic
  160.     cmp    al, 22h            ; modes 22 and 23 are text!
  161.     je    not_graphics
  162.     cmp    al, 23h
  163.     je    not_graphics
  164.     mov    cs:gmode_flag,al    ; non-zero value
  165. not_graphics:
  166. endm
  167. ENDIF
  168.  
  169. IF TVGA16
  170. card_id    macro
  171.     db    'Tatung VGA-16'
  172. endm
  173. gmode_test macro isgraphic
  174.     cmp    cs:video_mode, 10h    ; 640x350, 16 color mode
  175.     je    isgraphic
  176.     cmp    cs:video_mode, 12h    ; 640x480, 16 color VGA mode
  177.     je    isgraphic
  178. endm
  179. gmode_code macro
  180.     mov    cs:gmode_flag,0        ; assume character mode (zero flag)
  181.     cmp    al, 4
  182.     jb    not_graphics        ; modes >=4 are assumed to be graphic
  183.     cmp    al, 56h            ; modes 56 and 57 are text!
  184.     jb    not_graphics
  185.     cmp    al, 57h
  186.     jb    not_graphics
  187.     mov    cs:gmode_flag,al    ; non-zero value
  188. not_graphics:
  189. endm
  190. ENDIF
  191.  
  192.  
  193. IF    VEGA
  194. card_id    macro
  195.     db    'Video-Seven/Headland VGA'
  196. endm
  197. gmode_test macro isgraphic
  198.     cmp    cs:video_mode, 10h    ; 640x350, 16 color mode
  199.     je    isgraphic
  200.     cmp    cs:video_mode, 12h    ; 640x480, 16 color VGA mode
  201.     je    isgraphic
  202.     cmp    cs:video_mode, 14h    ; 752x410
  203.     je    isgraphic
  204.     cmp    cs:video_mode, 15h    ; 720x540
  205.     je    isgraphic
  206.     cmp    cs:video_mode, 16h    ; 800x600
  207.     je    isgraphic
  208. endm
  209. gmode_code macro
  210.     mov    cs:gmode_flag,0        ; assume character mode (zero flag)
  211.     cmp    al, 4
  212.     jb    not_graphics        ; modes >=4 are assumed to be graphic
  213.     mov    cs:gmode_flag,al    ; non-zero value
  214. not_graphics:
  215. endm
  216. ENDIF
  217.  
  218.  
  219. IF    EGAWIZ
  220. card_id    macro
  221.     db    'EGA Wizard Deluxe'
  222. endm
  223. gmode_test macro isgraphic
  224.     cmp    cs:video_mode, 10h    ; 640x350, 16 color mode
  225.     je    isgraphic
  226.     cmp    cs:video_mode, 12h    ; 640x480, 16 color VGA mode
  227.     je    isgraphic
  228.     cmp    cs:video_mode, 26h    ; 640x480, 60 line
  229.     je    isgraphic
  230.     cmp    cs:video_mode, 70h    ; 740x396
  231.     je    isgraphic
  232.     cmp    cs:video_mode, 71h    ; 800x600
  233.     je    isgraphic
  234. endm
  235. gmode_code macro
  236.     mov    cs:gmode_flag,0        ; assume character mode (zero flag)
  237.     cmp    al, 4
  238.     jb    not_graphics        ; modes >=4 are assumed to be graphic
  239.     cmp    al, 22h            ; 22-24 are nongraphic
  240.     jb    is_graphics
  241.     cmp    al, 24h
  242.     jbe    not_graphics
  243.     cmp    al, 32h            ; 32-34 are nongraphic
  244.     jb    is_graphics
  245.     cmp    al, 34h
  246.     jbe    not_graphics
  247.     cmp    al, 38h            ; 38 is nongraphic
  248.     je    not_graphics
  249. is_graphics:
  250.     mov    cs:gmode_flag,al    ; non-zero value
  251. not_graphics:
  252. endm
  253. ENDIF
  254.  
  255. IF TridentVGA
  256. card_id    macro
  257.     db    'Trident VGA'
  258. endm
  259. ; contributed by Nadav Horesh  CFNADAV%WEIZMANN.BITNET@CUNYVM.CUNY.EDU
  260. gmode_test macro isgraphic
  261.         cmp     cs:video_mode, 10h      ; 640x350, 16 color mode
  262.         je      isgraphic
  263.         cmp     cs:video_mode, 12h      ; 640x480, 16 color VGA mode
  264.         je      isgraphic
  265.         cmp     cs:video_mode, 5bh      ; 800x600, 16 color TVGA mode
  266.         je      isgraphic
  267.         cmp     cs:video_mode, 5fH      ; 1024x768 16 color TVGA mode
  268.         jnb     isgraphic
  269. endm
  270. gmode_code macro
  271.         mov     cs:gmode_flag,0         ; assume character mode (zero flag)
  272.         cmp     al, 4
  273.         jb      not_graphics            ; modes >=4 are assumed to be graphic
  274.         cmp     al, 050H
  275.         jb      is_graphics
  276.         cmp     al, 5Bh
  277.         jb      not_graphics
  278. is_graphics:
  279.     mov     cs:gmode_flag,al        ; non-zero value
  280. not_graphics:
  281. endm
  282. ENDIF
  283.  
  284. IF MAGICVGA
  285. ; Contributed by:
  286.  
  287.  
  288.  
  289. ;In-Real-Life: Andrew A. Chernov  |  Domain: ache@hq.demos.su,
  290. ;Zodiac-Sign:  Virgo              |          ache%hq.demos.su@relay.eu.net
  291. ;Organization: DEMOS Coop.,       |  Phone:  +7 095 2312129
  292. ;              Moscow, Russia     |  Fax:    +7 095 2335016
  293.  
  294. card_id    macro
  295.     db    'Magic VGA'
  296. endm
  297. gmode_test macro isgraphic
  298.     cmp    cs:video_mode, 10h    ; 640x350, 16 color mode
  299.     je    isgraphic
  300.     cmp    cs:video_mode, 12h    ; 640x480, 16 color VGA mode
  301.     je    isgraphic
  302.     cmp    cs:video_mode, 63h    ; 720x540, 16 color
  303.     je    isgraphic
  304.     cmp    cs:video_mode, 64h    ; 800x600, 16 color
  305.     je    isgraphic
  306. endm
  307. gmode_code macro
  308.     mov    cs:gmode_flag,0        ; assume character mode (zero flag)
  309.     cmp    al, 4
  310.     jb    not_graphics        ; modes =>4 are assumed to be graphic
  311.     cmp    al, 40h         ; modes 40-43 are text!
  312.     je    not_graphics
  313.     cmp    al, 41h
  314.     je    not_graphics
  315.     cmp    al, 42h
  316.     je    not_graphics
  317.     cmp    al, 43h
  318.     je    not_graphics
  319.     cmp    al, 50h         ; modes 50-53 are text!
  320.     je    not_graphics
  321.     cmp    al, 51h
  322.     je    not_graphics
  323.     cmp    al, 52h
  324.     je    not_graphics
  325.     cmp    al, 53h
  326.     je    not_graphics
  327.     mov    cs:gmode_flag,al    ; non-zero value
  328. not_graphics:
  329. endm
  330. ENDIF
  331. IF    CHIPS
  332. ; From Arend van den Brug
  333. card_id    macro
  334.     db    'Chips SVGA'
  335. endm
  336.  
  337. gmode_test macro isgraphic
  338.     cmp    cs:video_mode, 10h    ; 640x350, 16 color mode
  339.     je    isgraphic
  340.     cmp    cs:video_mode, 12h    ; 640x480, 16 color VGA mode
  341.     je    isgraphic
  342.     cmp    cs:video_mode, 6Ah    ; 800x600, 16 color
  343.     je    isgraphic
  344.     cmp    cs:video_mode, 70h    ; 800x600, 16 color
  345.     je    isgraphic
  346. endm
  347. gmode_code macro
  348.     mov    cs:gmode_flag,0        ; assume character mode (zero flag)
  349.     cmp    al, 4
  350.     jb    not_graphics        ; modes >=4 are assumed to be graphic
  351.     cmp    al, 60h            ; 60: 132x25 text 16 colors (char 8x14)
  352.     jb    is_graphics        ; 61: 132x50 text 16 colors (char 8x8)
  353.     cmp    al, 62h            ; 62: 132x43 text 16 colors (char 8x8)
  354.     jbe    not_graphics
  355.     cmp    al, 64h            ; 80x43 text 16 colors (char 9x8)
  356.     je    not_graphics
  357.     cmp    al, 65h            ; 80x50 text 16 colors (char 9x8)
  358.     je    not_graphics
  359. is_graphics:
  360.     mov    cs:gmode_flag,al    ; non-zero value
  361. not_graphics:
  362. endm
  363. ENDIF
  364.  
  365.